/*
 * @Author       : 邱狮杰
 * @Date         : 2021-03-30 15:34:06
 * @LastEditTime: 2021-03-30 21:30:17
 * @FilePath: /upload-template/webpackUploadTemplate/webpack.config.js
 * @Description  :
 *
 */
const { resolve } = require("path");
module.exports = {
  entry: "./src/index.ts",
  output: {
    publicPath: "template",
    filename: "bundle.js",
  },
  module: {
    rules: [
      { test: /\.css$/, use: ["style-loader", "css-loader"] },
      {
        test: /\.ts$/,
        use: ["awesome-typescript-loader"],
        exclude: /node_modules/,
      },
    ],
  },
  resolve: {
    extensions: [".ts", ".js", ".css"],
  },
  devServer: {
    port: 8080,
    contentBase: resolve(__dirname, "www"),
    watchContentBase: true,
    open: true,
    hot: true,
  },
  mode: "development",
};
